@default-color: #873bf4;

@padding: 24px;

h2 {
  margin: 0 @padding;
}

.dashboard-container {
  display: grid;
  padding: @padding;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-column-gap: 8px;
  grid-row-gap: 16px;

  .dashboard-item {
    // 1094 * 560px
    height: calc(12.79vw - 8px);
    display: grid;
    position: relative;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;

    &:hover {
      cursor: pointer;
      background-color: rgba(135, 59, 244, 0.25);
    }

    &.disable:hover {
      cursor: not-allowed;
    }

    .dashboard-description {
      position: absolute;
      text-align: center;
      width: 100%;
      height: 100%;
      left: 0px;
      right: 0;
      bottom: 0;
      top: 0;
      background-color: rgba(135, 59, 244, 0.25);

      display: flex;
      align-items: center;
      justify-content: center;

      span {
        background: rgb(255, 255, 255);
        color: @default-color;
        font-size: 14px;
        line-height: 1em;
        padding: 5px 9px;
        border-radius: 2px;
        opacity: 0;
        transform: translate(0px, 15px);
        transition: all 400ms ease 0s;
      }

      &:hover {
        background-color: rgba(135, 59, 244, 0.65);

        span {
          opacity: 1;
          transform: translate(0px, 0px);
        }
      }
    }
  }

  .dashboard-author {
    color: rgba(0, 0, 0, 0.85);
    font-size: 12px;
    line-height: 1em;

    span {
      color: rgba(0, 0, 0, 0.95);
      font-weight: bold;

      &:hover {
        color: @default-color;
        cursor: pointer;
      }
    }
  }
}

@media only screen and (max-width: 1048px) {
  .dashboard-container {
    grid-template-columns: 1fr 1fr 1fr;
    overflow-y: auto;

    .dashboard-item {
      // 1094 * 560px
      height: calc(17.06vw - 8px);
    }
  }
}

@media only screen and (max-width: 760px) {
  .dashboard-container {
    grid-template-columns: 1fr 1fr;
    overflow-y: auto;

    .dashboard-item {
      // 1094 * 560px
      height: calc(25.59vw - 16px);
    }
  }
}

@media only screen and (max-width: 496px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    overflow-y: auto;

    .dashboard-item {
      // 1094 * 560px
      height: calc(51.18vw - 24px);
    }
  }
}
